home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE19 / TIPTRIX / LISTING4.PAS next >
Encoding:
Pascal/Delphi Source File  |  1997-02-18  |  650 b   |  23 lines

  1. { Read Table and fill combo boxes }
  2. procedure ReadTable(Sender: TObject);
  3. var
  4.    j: integer;
  5.    code : String;
  6.    test : Boolean;
  7. begin
  8.       for j := 0 to ComponentCount - 1 do begin
  9.          if Components[j] is TDBComboBox then begin
  10.             if (Components[j] as TDBComboBox).tag = 0 then begin
  11.                Table.Open;
  12.                Table.First;
  13.                while not Table.EOf do begin
  14.                   (Components[j] as TDBComboBox).Items.Add(Table.FieldByName('CODE').AsString);
  15.                   Table.next;
  16.                end;
  17.                      Table.Close;
  18.             end;
  19.          end;
  20.       end;
  21. end;
  22.  
  23.